package com.xuanwu.shop.other;

import java.util.List;

import org.junit.Test;

import com.xuanwu.shop.entity.Category;
import com.xuanwu.shop.service.CategoryServiceInterface;
import com.xuanwu.shop.service.impl.CategoryServiceImpl;

public class CategoryTest {

	private CategoryServiceInterface service = new CategoryServiceImpl();
	
	@Test
	public void testGetFirstList(){
		List<Category> list = service.getFirstList();
		if(list == null){
			System.out.println("null");
			return;
		}
		for (Category category : list) {
			System.out.println(category.getName());
		}
	}
	
	@Test
	public void testGetSecondList(){
		List<Category> list = service.getSecondListByPid(2);
		if(list == null){
			System.out.println("null");
			return;
		}
		for (Category category : list) {
			System.out.println(category.getName());
		}
	}
	
}
